<?php
    $maoshu1=array("1","2","3","4"  );
    $maoshu2=["2","3","4","5"];
    print_r($maoshu1[5]);
    echo "<br>";
    print_r($maoshu2);

    $xia=[];
    $xia[0]=0;
    $xia[1]=1;
    $xia[2]=2;
    $xia[5]=5;

    $list=[
        "2",
        "test"=>"夏丹成",
        "3",
        "test2"=>"夏德"
        ,"4"
    ];
    echo count($list);
    echo "<br>";
    print_r($list);

    echo "<br>";
    echo "<hr>";
    for ($i=0;$i<count($list);$i++){
        echo $list[$i];
        echo "<br>";
    };

/**
 * foreach
 */
echo "<br>";
echo "<hr>";
    foreach ($list as $key=>$value){
        echo $key.'--'.$value;
        echo "<br>";
    }
    $navbarArray=[
        [
            "href"=>"home",
            "title"=>"首页"
        ],
        [
            "href"=>"about",
            "title"=>"关于我"
        ],
        [
            "href"=>"posts",
            "title"=>"博客"
        ],
        [
            "href"=>"contact",
            "title"=>"联系我"
        ],
    ]

    ?>

